package com.ruoyi.site.service.impl;

import java.util.List;

import com.ruoyi.site.domain.Tracks;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.site.mapper.PlaylistsMapper;
import com.ruoyi.site.domain.Playlists;
import com.ruoyi.site.service.IPlaylistsService;

/**
 * 播放列Service业务层处理
 * 
 * @author chuckeytang
 * @date 2025-08-17
 */
@Service
public class PlaylistsServiceImpl implements IPlaylistsService 
{
    @Autowired
    private PlaylistsMapper playlistsMapper;

    /**
     * 查询播放列
     * 
     * @param playlistId 播放列主键
     * @return 播放列
     */
    @Override
    public Playlists selectPlaylistsByPlaylistId(Long playlistId)
    {
        return playlistsMapper.selectPlaylistsByPlaylistId(playlistId);
    }

    /**
     * 查询播放列列表
     * 
     * @param playlists 播放列
     * @return 播放列
     */
    @Override
    public List<Playlists> selectPlaylistsList(Playlists playlists)
    {
        return playlistsMapper.selectPlaylistsList(playlists);
    }

    /**
     * 新增播放列
     * 
     * @param playlists 播放列
     * @return 结果
     */
    @Override
    public int insertPlaylists(Playlists playlists)
    {
        return playlistsMapper.insertPlaylists(playlists);
    }

    /**
     * 修改播放列
     * 
     * @param playlists 播放列
     * @return 结果
     */
    @Override
    public int updatePlaylists(Playlists playlists)
    {
        return playlistsMapper.updatePlaylists(playlists);
    }

    /**
     * 批量删除播放列
     * 
     * @param playlistIds 需要删除的播放列主键
     * @return 结果
     */
    @Override
    public int deletePlaylistsByPlaylistIds(Long[] playlistIds)
    {
        return playlistsMapper.deletePlaylistsByPlaylistIds(playlistIds);
    }

    /**
     * 删除播放列信息
     * 
     * @param playlistId 播放列主键
     * @return 结果
     */
    @Override
    public int deletePlaylistsByPlaylistId(Long playlistId)
    {
        return playlistsMapper.deletePlaylistsByPlaylistId(playlistId);
    }

    @Override
    public List<Tracks> selectTracksByPlaylistId(Long playlistId) {
        return playlistsMapper.selectTracksByPlaylistId(playlistId);
    }
}
